-
-
Couldn't load subscription status.
- Fork 33
Use import map in denops itself #451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@lambdalisue has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 1 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (69)
WalkthroughThis change updates import statements across the codebase, removing explicit version specifiers and the "jsr:" prefix from module paths, switching to direct, unversioned package imports. It also introduces and updates Deno configuration files, including new import maps and workspace settings. Additionally, the Deno process is now started with an explicit configuration file. Changes
Sequence Diagram(s)sequenceDiagram
participant Vim
participant ProcVim
participant Deno
Vim->>ProcVim: Start server
ProcVim->>Deno: Spawn Deno process with --config deno.jsonc
Deno-->>ProcVim: Deno process initialized with config
ProcVim-->>Vim: Server ready
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 15
🔭 Outside diff range comments (11)
tests/denops/runtime/functions/plugin/check_type_test.ts (1)
1-5: Fix Prettier failure – collapse multiline import to one line
CI is failing with “Import statements should be in a single line”. Re-format the destructured import accordingly:-import { - assertMatch, - assertNotMatch, - assertRejects, -} from "@std/assert"; +import { assertMatch, assertNotMatch, assertRejects } from "@std/assert";This satisfies the repository’s Prettier rule while keeping the same semantics.
tests/denops/runtime/functions/plugin/load_test.ts (1)
1-6: Fix Prettier-breaking multiline importCI failed because Prettier expects this import on a single line. Collapsing it satisfies the formatter without touching semantics.
-import { - assertEquals, - assertMatch, - assertRejects, -} from "@std/assert"; +import { assertEquals, assertMatch, assertRejects } from "@std/assert";denops/@denops-private/version.ts (1)
22-24:parse()may returnnull– propagate fallback instead
parse()returnsSemVer | null; if it yieldsnull, the function currently violates its declared return type (SemVer | T) and leaks anullvalue.- return parse(decoder.decode(stdout).trim()); + return parse(decoder.decode(stdout).trim()) ?? fallback;This preserves type guarantees and avoids surprising
nulls.tests/denops/runtime/functions/plugin/reload_test.ts (1)
1-6: CI is red – Prettier expects this import on one lineGitHub Actions fails with
Prettier formatting check failed. Import statements should be in a single line.
Collapse the multiline import to satisfy the formatter:-import { - assertEquals, - assertMatch, - assertRejects, -} from "@std/assert"; +import { assertEquals, assertMatch, assertRejects } from "@std/assert";No functional behaviour changes; just formatting.
tests/denops/runtime/functions/plugin/discover_test.ts (1)
1-6: CI is red – Prettier flags multiline@std/assertimportSame Prettier error as in
reload_test.ts. Flatten the import:-import { - assertArrayIncludes, - assertEquals, - assertMatch, -} from "@std/assert"; +import { assertArrayIncludes, assertEquals, assertMatch } from "@std/assert";After this change the formatting gate should pass.
tests/denops/runtime/functions/plugin/unload_test.ts (1)
1-6: Fix import formatting to pass Prettier checks.The import path changes from versioned "jsr:" imports to direct package imports are correct and align with the import map approach. However, the multiline import format is causing Prettier formatting failures.
Apply this diff to fix the formatting:
-import { - assertEquals, - assertMatch, - assertRejects, -} from "@std/assert"; -import { delay } from "@std/async"; +import { assertEquals, assertMatch, assertRejects } from "@std/assert"; +import { delay } from "@std/async";tests/denops/runtime/functions/server/start_test.ts (1)
1-8: Resolve formatting failure – keep the whole import in one lineSame Prettier error as elsewhere; collapse the
@std/assertimport list.-import { - assert, - assertEquals, - assertFalse, - assertMatch, - assertNotMatch, - assertStringIncludes, -} from "@std/assert"; +import { assert, assertEquals, assertFalse, assertMatch, assertNotMatch, assertStringIncludes } from "@std/assert";denops/@denops-private/host/nvim_test.ts (1)
1-6: Prettier violation – collapse@std/assertimport-import { - assertEquals, - assertMatch, - assertRejects, - assertStringIncludes, -} from "@std/assert"; +import { assertEquals, assertMatch, assertRejects, assertStringIncludes } from "@std/assert";tests/denops/runtime/functions/server/close_test.ts (1)
1-6: Prettier violation – collapse@std/assertimport-import { - assert, - assertEquals, - assertMatch, - assertRejects, -} from "@std/assert"; +import { assert, assertEquals, assertMatch, assertRejects } from "@std/assert";denops/@denops-private/host/vim_test.ts (1)
1-15: Fix Prettier formatting for import statements.The import path updates are correct and follow the proper import map migration pattern, but there's a formatting issue that needs to be addressed.
Apply this formatting fix for the import statement on lines 1-5:
-import { - assertEquals, - assertMatch, - assertRejects, -} from "@std/assert"; +import { assertEquals, assertMatch, assertRejects } from "@std/assert";denops/@denops-private/plugin_test.ts (1)
1-14: Fix Prettier-blocking multiline import blocksThe CI fails because each import must be a single-line statement.
Refactor the two multiline blocks at Lines 1-7 and 8-13:-import { - assert, - assertEquals, - assertInstanceOf, - assertRejects, - assertStringIncludes, -} from "@std/assert"; +import { assert, assertEquals, assertInstanceOf, assertRejects, assertStringIncludes } from "@std/assert"; -import { - assertSpyCall, - assertSpyCalls, - spy, - stub, -} from "@std/testing/mock"; +import { assertSpyCall, assertSpyCalls, spy, stub } from "@std/testing/mock";
♻️ Duplicate comments (3)
tests/denops/testdata/dummy_plugins/denops/dummy_valid/main.ts (1)
1-1: Same import-map prerequisite as noted aboveThe comment on
@denops/coremapping equally applies here.tests/denops/testdata/dummy_invalid_plugin.ts (1)
1-1: Same import-map prerequisite as noted aboveThe comment on
@denops/coremapping equally applies here.tests/denops/runtime/functions/plugin/is_loaded_test.ts (1)
1-2: Samedelayre-export caveat as inwait_test.ts
delayis imported from the root@std/asyncpackage. Please ensure it is
re-exported there (or switch to@std/async/delayfor clarity).
🧹 Nitpick comments (4)
denops/@denops-private/error.ts (1)
1-7: Same alias-resolution caveat as above
@core/unknownutil/*and@core/errorutilmust also be present in the import map ordeno cachewill break.If you already verified the mappings for
host.ts, extend that check to include:@core/errorutiltests/denops/testutil/wait.ts (1)
6-13: Doc comment’s default timeout is out of sync with constant
DEFAULT_TIMEOUTis30_000, but the JSDoc still says@default {10_000}.
Keeping them aligned avoids confusion.- * @default {10_000} + * @default {30_000}tests/denops/runtime/plugin_test.ts (1)
1-2: Minor style inconsistency indelayimportHere
delayis brought in via the sub-module@std/async/delay, whereas other tests (wait_async_test.ts) rely on the barrel export@std/async.
For consistency across the suite consider using a single form (prefer the barrel import unless tree-shaking size is a concern).tests/denops/runtime/functions/plugin/wait_async_test.ts (1)
6-7: Keep delay import form consistent
delayis imported from the barrel module@std/asynchere, while other tests use@std/async/delay. Aligning on one form will avoid accidental duplication in future lock-files.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (69)
autoload/denops/_internal/server/proc.vim(2 hunks)deno.jsonc(1 hunks)denops/@denops-private/cli.ts(1 hunks)denops/@denops-private/cli_test.ts(2 hunks)denops/@denops-private/deno.jsonc(1 hunks)denops/@denops-private/denops.ts(1 hunks)denops/@denops-private/denops_test.ts(2 hunks)denops/@denops-private/error.ts(1 hunks)denops/@denops-private/error_test.ts(1 hunks)denops/@denops-private/host.ts(1 hunks)denops/@denops-private/host/nvim.ts(1 hunks)denops/@denops-private/host/nvim_test.ts(1 hunks)denops/@denops-private/host/vim.ts(1 hunks)denops/@denops-private/host/vim_test.ts(1 hunks)denops/@denops-private/host_test.ts(1 hunks)denops/@denops-private/plugin.ts(1 hunks)denops/@denops-private/plugin_test.ts(1 hunks)denops/@denops-private/service.ts(1 hunks)denops/@denops-private/service_test.ts(1 hunks)denops/@denops-private/util.ts(1 hunks)denops/@denops-private/version.ts(1 hunks)denops/@denops-private/version_test.ts(1 hunks)denops/@denops-private/worker.ts(1 hunks)denops/@denops-private/worker_test.ts(1 hunks)tests/denops/runtime/functions/denops/interrupt_test.ts(1 hunks)tests/denops/runtime/functions/denops/notify_test.ts(1 hunks)tests/denops/runtime/functions/denops/request_async_test.ts(1 hunks)tests/denops/runtime/functions/denops/request_test.ts(1 hunks)tests/denops/runtime/functions/plugin/check_type_test.ts(1 hunks)tests/denops/runtime/functions/plugin/discover_test.ts(1 hunks)tests/denops/runtime/functions/plugin/is_loaded_test.ts(1 hunks)tests/denops/runtime/functions/plugin/load_test.ts(1 hunks)tests/denops/runtime/functions/plugin/reload_test.ts(1 hunks)tests/denops/runtime/functions/plugin/unload_test.ts(1 hunks)tests/denops/runtime/functions/plugin/wait_async_test.ts(1 hunks)tests/denops/runtime/functions/plugin/wait_test.ts(1 hunks)tests/denops/runtime/functions/server/close_test.ts(1 hunks)tests/denops/runtime/functions/server/connect_test.ts(1 hunks)tests/denops/runtime/functions/server/start_test.ts(1 hunks)tests/denops/runtime/functions/server/status_test.ts(1 hunks)tests/denops/runtime/functions/server/stop_test.ts(1 hunks)tests/denops/runtime/plugin_test.ts(1 hunks)tests/denops/testdata/dummy_dispatcher_plugin.ts(1 hunks)tests/denops/testdata/dummy_interrupt_plugin.ts(1 hunks)tests/denops/testdata/dummy_invalid_constraint_plugin.ts(1 hunks)tests/denops/testdata/dummy_invalid_constraint_plugin2.ts(1 hunks)tests/denops/testdata/dummy_invalid_dispose_plugin.ts(1 hunks)tests/denops/testdata/dummy_invalid_plugin.ts(1 hunks)tests/denops/testdata/dummy_invalid_wait_plugin.ts(1 hunks)tests/denops/testdata/dummy_plugins/denops/@dummy_namespace/main.ts(1 hunks)tests/denops/testdata/dummy_plugins/denops/dummy.invalid_name/main.ts(1 hunks)tests/denops/testdata/dummy_plugins/denops/dummy_invalid/main.ts(1 hunks)tests/denops/testdata/dummy_plugins/denops/dummy_valid/main.ts(1 hunks)tests/denops/testdata/dummy_valid_dispose_plugin.ts(1 hunks)tests/denops/testdata/dummy_valid_plugin.ts(1 hunks)tests/denops/testdata/dummy_valid_wait_plugin.ts(1 hunks)tests/denops/testdata/resolve.ts(1 hunks)tests/denops/testdata/shared_server_test_no_verbose.ts(1 hunks)tests/denops/testdata/shared_server_test_verbose_true.ts(1 hunks)tests/denops/testdata/with_import_map/plugin_with_import_map.ts(1 hunks)tests/denops/testutil/conf.ts(1 hunks)tests/denops/testutil/conf_test.ts(1 hunks)tests/denops/testutil/mock.ts(1 hunks)tests/denops/testutil/mock_test.ts(1 hunks)tests/denops/testutil/shared_server.ts(1 hunks)tests/denops/testutil/shared_server_test.ts(1 hunks)tests/denops/testutil/wait.ts(1 hunks)tests/denops/testutil/wait_test.ts(1 hunks)tests/denops/testutil/with.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: Milly
PR: vim-denops/denops.vim#418
File: tests/denops/runtime/functions/plugin/check_type_test.ts:6-6
Timestamp: 2024-09-14T17:09:30.174Z
Learning: In this project, import paths prefixed with `/denops-testdata/` are defined in `deno.jsonc` via an import map, and these import paths are valid.
📚 Learning: in this project, import paths prefixed with `/denops-testdata/` are defined in `deno.jsonc` via an i...
Learnt from: Milly
PR: vim-denops/denops.vim#418
File: tests/denops/runtime/functions/plugin/check_type_test.ts:6-6
Timestamp: 2024-09-14T17:09:30.174Z
Learning: In this project, import paths prefixed with `/denops-testdata/` are defined in `deno.jsonc` via an import map, and these import paths are valid.
Applied to files:
tests/denops/testdata/dummy_invalid_constraint_plugin.tstests/denops/testdata/dummy_invalid_wait_plugin.tstests/denops/testdata/dummy_valid_dispose_plugin.tstests/denops/testdata/resolve.tstests/denops/testutil/conf_test.tstests/denops/testutil/conf.tstests/denops/runtime/functions/plugin/load_test.tstests/denops/runtime/functions/plugin/check_type_test.tstests/denops/testdata/dummy_invalid_constraint_plugin2.tstests/denops/testdata/dummy_invalid_plugin.tstests/denops/testdata/dummy_plugins/denops/dummy.invalid_name/main.tsdenops/@denops-private/host_test.tstests/denops/testutil/mock.tsdenops/@denops-private/util.tstests/denops/testdata/dummy_plugins/denops/dummy_valid/main.tstests/denops/testdata/dummy_plugins/denops/dummy_invalid/main.tstests/denops/runtime/functions/server/status_test.tstests/denops/runtime/functions/plugin/wait_test.tstests/denops/testdata/dummy_dispatcher_plugin.tsdenops/@denops-private/host/nvim_test.tsdenops/@denops-private/plugin.tstests/denops/runtime/functions/denops/interrupt_test.tsdenops/@denops-private/host/vim.tstests/denops/runtime/functions/server/close_test.tstests/denops/runtime/functions/denops/notify_test.tsdenops/@denops-private/deno.jsonctests/denops/testdata/dummy_interrupt_plugin.tstests/denops/testdata/dummy_valid_plugin.tstests/denops/testdata/shared_server_test_verbose_true.tstests/denops/testdata/dummy_invalid_dispose_plugin.tstests/denops/testdata/with_import_map/plugin_with_import_map.tstests/denops/testutil/shared_server.tstests/denops/testdata/dummy_plugins/denops/@dummy_namespace/main.tstests/denops/runtime/functions/plugin/wait_async_test.tsdenops/@denops-private/cli.tstests/denops/testdata/dummy_valid_wait_plugin.tsdenops/@denops-private/host.tstests/denops/runtime/functions/server/start_test.tstests/denops/testdata/shared_server_test_no_verbose.tstests/denops/testutil/mock_test.tsdenops/@denops-private/denops_test.tsdenops/@denops-private/error_test.tsdenops/@denops-private/version_test.tsdenops/@denops-private/plugin_test.tstests/denops/testutil/wait.tsdenops/@denops-private/error.tsdenops/@denops-private/worker_test.tstests/denops/runtime/functions/server/connect_test.tsdenops/@denops-private/cli_test.tstests/denops/runtime/functions/plugin/unload_test.tsdenops/@denops-private/version.tstests/denops/runtime/functions/plugin/reload_test.tstests/denops/runtime/functions/denops/request_test.tstests/denops/runtime/plugin_test.tstests/denops/runtime/functions/server/stop_test.tsdenops/@denops-private/service_test.tsdenops/@denops-private/denops.tsdenops/@denops-private/host/vim_test.tstests/denops/runtime/functions/plugin/is_loaded_test.tstests/denops/testutil/with.tstests/denops/testutil/wait_test.tstests/denops/runtime/functions/denops/request_async_test.tsautoload/denops/_internal/server/proc.vimdenops/@denops-private/service.tstests/denops/runtime/functions/plugin/discover_test.tsdenops/@denops-private/host/nvim.tstests/denops/testutil/shared_server_test.tsdenops/@denops-private/worker.tsdeno.jsonc
📚 Learning: in the `denops/@denops-private/service.ts` file, initializing properties like `#loadedwaiter` in the...
Learnt from: lambdalisue
PR: vim-denops/denops.vim#344
File: denops/@denops-private/service.ts:183-183
Timestamp: 2024-07-08T01:52:22.851Z
Learning: In the `denops/@denops-private/service.ts` file, initializing properties like `#loadedWaiter` in the constructor is a common and acceptable pattern.
Applied to files:
tests/denops/testdata/dummy_invalid_wait_plugin.tstests/denops/testdata/dummy_dispatcher_plugin.tstests/denops/testdata/shared_server_test_verbose_true.tstests/denops/testdata/dummy_valid_wait_plugin.tstests/denops/testdata/shared_server_test_no_verbose.tsdenops/@denops-private/denops.tsdenops/@denops-private/service.ts
📚 Learning: `neovim` and `vim` from `../host/nvim.ts` and `../host/vim.ts` are classes and should be imported no...
Learnt from: Milly
PR: vim-denops/denops.vim#352
File: denops/@denops-private/testutil/host.ts:3-4
Timestamp: 2024-07-27T10:03:47.237Z
Learning: `Neovim` and `Vim` from `../host/nvim.ts` and `../host/vim.ts` are classes and should be imported normally if they are instantiated in the code.
Applied to files:
denops/@denops-private/host/nvim_test.tsdenops/@denops-private/host/vim.tsdenops/@denops-private/host.tsdenops/@denops-private/worker_test.tsdenops/@denops-private/host/vim_test.tsdenops/@denops-private/service.tsdenops/@denops-private/host/nvim.tsdenops/@denops-private/worker.ts
📚 Learning: in the denops.vim project, the `denops#plugin#unload()` function is designed to throw exceptions to ...
Learnt from: Milly
PR: vim-denops/denops.vim#385
File: autoload/denops/plugin.vim:56-58
Timestamp: 2024-07-05T15:37:46.867Z
Learning: In the Denops.vim project, the `denops#plugin#unload()` function is designed to throw exceptions to the caller, who is responsible for handling them.
Applied to files:
denops/@denops-private/plugin.tsdenops/@denops-private/host/vim.ts
📚 Learning: the `denops#_internal#server#chan#notify` function is designed to throw an error in case of an inval...
Learnt from: Milly
PR: vim-denops/denops.vim#335
File: autoload/denops/plugin.vim:73-75
Timestamp: 2024-07-27T10:03:47.237Z
Learning: The `denops#_internal#server#chan#notify` function is designed to throw an error in case of an invalid state, such as when the channel is `v:null`.
Applied to files:
denops/@denops-private/host/vim.tstests/denops/runtime/functions/denops/notify_test.ts
📚 Learning: the `emit` function in the denops plugin system catches and logs errors internally, ensuring it does...
Learnt from: Milly
PR: vim-denops/denops.vim#335
File: denops/@denops-private/service.ts:245-259
Timestamp: 2024-07-27T10:03:47.237Z
Learning: The `emit` function in the Denops plugin system catches and logs errors internally, ensuring it does not throw errors to the caller.
Applied to files:
denops/@denops-private/service.ts
🪛 GitHub Actions: Test
tests/denops/runtime/functions/plugin/load_test.ts
[error] 1-5: Prettier formatting check failed. Import statements should be in a single line.
tests/denops/runtime/functions/plugin/check_type_test.ts
[error] 1-5: Prettier formatting check failed. Import statements should be in a single line.
denops/@denops-private/host_test.ts
[error] 2-6: Prettier formatting check failed. Import statements should be in a single line.
denops/@denops-private/host/vim.ts
[error] 7-11: Prettier formatting check failed. Import statements should be in a single line.
tests/denops/runtime/functions/server/close_test.ts
[error] 1-6: Prettier formatting check failed. Import statements should be in a single line.
denops/@denops-private/deno.jsonc
[error] 13-34: Prettier formatting check failed. Found trailing commas that should be removed.
[error] 17-18: Prettier formatting check failed. Found trailing commas that should be removed.
tests/denops/testutil/mock_test.ts
[error] 15-20: Prettier formatting check failed. Import statements should be in a single line.
denops/@denops-private/plugin_test.ts
[error] 8-13: Prettier formatting check failed. Import statements should be in a single line.
denops/@denops-private/worker_test.ts
[error] 9-14: Prettier formatting check failed. Import statements should be in a single line.
tests/denops/runtime/functions/plugin/unload_test.ts
[error] 1-5: Prettier formatting check failed. Import statements should be in a single line.
tests/denops/runtime/functions/plugin/reload_test.ts
[error] 1-5: Prettier formatting check failed. Import statements should be in a single line.
denops/@denops-private/host/vim_test.ts
[error] 1-5: Prettier formatting check failed. Import statements should be in a single line.
tests/denops/runtime/functions/plugin/discover_test.ts
[error] 1-5: Prettier formatting check failed. Import statements should be in a single line.
deno.jsonc
[error] 13-34: Prettier formatting check failed. Found trailing commas that should be removed.
[error] 17-18: Prettier formatting check failed. Found trailing commas that should be removed.
🔇 Additional comments (40)
tests/denops/runtime/functions/server/status_test.ts (1)
1-1: Import path change looks goodSwitching to the bare specifier
@std/assertaligns with the new import-map strategy.
No further action required.tests/denops/runtime/functions/denops/request_async_test.ts (1)
1-6: Consistent with import-map migrationThe assertion utilities now come from
@std/assert, matching the rest of the codebase.
LGTM.tests/denops/testdata/dummy_plugins/denops/dummy.invalid_name/main.ts (1)
1-1: Entrypoint import updated correctlyThe switch to
@denops/coreis consistent with the new mapping. No issues found.tests/denops/testdata/dummy_invalid_constraint_plugin.ts (1)
1-1: Import path modernised
@denops/corespecifier aligns with project-wide changes. Looks good.tests/denops/testdata/shared_server_test_no_verbose.ts (1)
1-1: Ensure@std/async/delayresolves to a pinned std versionSwitching to the
@std/async/delayalias is fine, but std APIs can introduce breaking changes between minor versions.
Confirm that the import map pins@std/*to a concrete version (e.g.https://deno.land/[email protected]/) rather than the movinglatesttag, otherwise futuredeno testruns may break unexpectedly.tests/denops/runtime/functions/denops/interrupt_test.ts (1)
1-1: Lock the@std/assertalias to a specific std release
assert/assertEqualsoccasionally change behaviour (e.g. diff formatting) across std releases.
Pin the alias in your import map the same way you pin other std modules to keep test output deterministic.tests/denops/testutil/conf_test.ts (1)
1-1: Same concern: make sure@std/assertin the import map is version-pinnedApplies here as well—un-pinned std imports can silently pull in breaking updates.
tests/denops/testdata/dummy_invalid_dispose_plugin.ts (1)
1-1: Import-map alias looks correct – no further changes required
Switching to@denops/corematches the new import-map scheme and keeps the file self-contained.tests/denops/testdata/dummy_plugins/denops/@dummy_namespace/main.ts (1)
1-1: LGTM on updated import path
The alias@denops/coreshould resolve via the workspace import map; nothing else changed.tests/denops/testdata/dummy_valid_plugin.ts (1)
1-1: Import alias update is fine
No behavioural changes introduced; import map will resolve the new specifier.tests/denops/testdata/shared_server_test_verbose_true.ts (1)
1-1: Alias switch acknowledged
@std/async/delayis the correct import-map target; test logic unchanged.tests/denops/testdata/dummy_valid_dispose_plugin.ts (1)
1-1: Import map for @denops/core confirmed
Thedeno.jsoncimport map already includes"@denops/core": "jsr:@denops/core@^7.0.0",so the bare specifier will resolve correctly in tests. No further changes required.
tests/denops/testdata/dummy_plugins/denops/dummy_invalid/main.ts (1)
1-1: Alias looks fine – just ensure it resolves under all task runners
@denops/coreis now resolved via the import map. As long as everydeno test/deno taskinvocation passes--config deno.jsonc(or the workspace’s default), this change is good.tests/denops/testdata/dummy_valid_wait_plugin.ts (1)
1-2: LGTM – import-map aliasing only
Nothing else changed; behaviour is identical.tests/denops/testutil/conf.ts (1)
1-3: Imports updated correctlyPath helpers are now brought in via the import map. No functional impact; the rest of the file already guards Windows paths with
removeTrailingSep.tests/denops/testutil/mock.ts (1)
1-2: Consistent aliasing, no behavioural changeSwitching to
@std/assert&@denops/corekeeps typings intact and removes thejsr:prefix. Looks good.tests/denops/testdata/dummy_invalid_wait_plugin.ts (1)
1-2: Import-map dependency checkEnsure
@denops/coreand@std/async/delayare mapped; otherwise this test-data plugin won’t build.tests/denops/testutil/with.ts (1)
1-2: Verify new stream-utility aliasesBare specifiers
@core/streamutiland@milly/streams/transform/taprequire import-map entries. Missing mappings will surface only at test run time.denops/@denops-private/version.ts (1)
1-4: Alias mapping check for std modules
@std/path/*and@std/semver/*must be present in the import map. Unlike third-party packages, these std aliases are not provided by Deno automatically when using an import map.tests/denops/runtime/functions/plugin/wait_test.ts (1)
8-9: Manual verification needed: ensure@std/asyncactually exportsdelay
I wasn’t able to locate an import-map entry for@std/indeno.jsonc, so please confirm the following before shipping:
- In
deno.jsonc(or your import-map file), that"@std/"is mapped to the correcthttps://deno.land/std@…/URL.- That the remote
async/mod.ts(e.g.https://deno.land/std@…/async/mod.ts) contains an export fordelay(either directly or viaexport * from "./delay.ts").If you can’t guarantee the stable re-export of
delay, switch your imports to the explicit sub-path:- import { delay } from "@std/async"; + import { delay } from "@std/async/delay.ts";denops/@denops-private/error_test.ts (1)
1-2: Imports look good with import-map aliasesThe alias switch is clean and consistent with the new
deno.jsonc. No further
concerns here.denops/@denops-private/version_test.ts (1)
1-8: Verify that the new short-form imports are pinned via the import-mapMoving from fully-qualified URLs to bare specifiers (
@std/assert,@core/unknownutil/*, …) is fine as long asdeno.jsonc(orimport_map.json) maps every specifier to an exact version. Otherwise the project will silently float to newer std / unknownutil releases and tests may break reproducibly.Please double-check that every alias introduced here is present in the import-map with an explicit version (or lock-file), and that
deno task vendor/deno cache --lockare part of CI.tests/denops/runtime/functions/denops/request_test.ts (1)
1-6: LGTM – import specifier update onlyThe import has been aligned with the new import-map style and no CI warnings are reported for this file.
tests/denops/runtime/functions/denops/notify_test.ts (1)
1-2: LGTM – specifier switch looks correct
@std/assertand@std/async/delayresolve fine through the import-map; no further action needed.denops/@denops-private/denops.ts (1)
7-11: LGTM! Import paths correctly updated for import map usage.The transition from versioned "jsr:" imports to direct package imports is clean and consistent with the PR objective to use import maps. The formatting is already correct and no functional changes were made.
tests/denops/testutil/shared_server.ts (1)
1-5: LGTM! Clean import path updates.All import statements have been correctly updated to use direct package imports without version specifiers, aligning with the import map approach. The formatting is proper and no functional changes were introduced.
denops/@denops-private/plugin.ts (2)
1-1: LGTM! Import path correctly simplified.The import from "@denops/core" has been properly updated to remove version constraints, consistent with the import map approach.
6-10: LGTM! All import paths properly updated.All imports have been successfully converted from versioned "jsr:" format to direct package imports, maintaining consistency with the import map refactoring across the codebase.
tests/denops/runtime/functions/server/stop_test.ts (1)
6-7: LGTM! Import statements properly updated.Both import statements have been correctly updated to use direct package imports without version specifiers, aligning with the import map approach. The formatting is already correct.
tests/denops/testutil/wait_test.ts (1)
1-8: Import-map migration looks goodThe switch to
@std/assert,@std/testing/mock, and@std/testing/timematches the new import-map aliases. No further action needed.denops/@denops-private/host/vim.ts (1)
1-6: Alias switch verifiedThe unknownutil alias imports resolve through the new import-map and compile fine. No issues spotted.
denops/@denops-private/denops_test.ts (1)
1-18: Imports migrated correctlyAll std/core/jsr specifiers have been converted to the new aliases and match the workspace import-map. Test logic remains untouched.
tests/denops/runtime/functions/server/connect_test.ts (1)
7-9: Verify new aliases are present in the import mapAll imports now rely on
@std/*,@nick/*, etc. Please make sure these keys exist indeno.jsonc/import_map.jsonand that the CI executesdeno testwith--config=deno.jsoncso the resolver locates them.denops/@denops-private/service.ts (1)
1-2: Import-map migration LGTMThe switch to
@denops/coreand@core/errorutilvia the map is consistent and poses no functional risk.denops/@denops-private/cli.ts (1)
4-7: Imports updated correctlyAliases for
workerio,deadline,parseArgs, andasyncSignallook consistent with the new import-map scheme.tests/denops/testdata/dummy_interrupt_plugin.ts (1)
1-2: Imports align with project-wide alias changeNothing else to flag here.
denops/@denops-private/worker.ts (1)
7-11: Worker-side aliases updated correctlyThe worker now depends on mapped aliases only—looks good.
tests/denops/testutil/shared_server_test.ts (1)
7-9: LGTM! Import map migration looks correct.The import statements have been successfully updated to use the simplified paths without "jsr:" prefixes and explicit version specifiers, which aligns with the PR objectives of utilizing import map aliases.
denops/@denops-private/service_test.ts (1)
13-24: LGTM! Comprehensive import map migration completed.All import statements have been correctly updated to use simplified paths without "jsr:" prefixes and version specifiers. The changes are consistent with the project-wide migration to import map usage.
denops/@denops-private/host/nvim.ts (1)
1-8: LGTM! Import map migration completed correctly.All import statements have been successfully updated to use simplified paths without "jsr:" prefixes and explicit version specifiers. The changes include both @core utility functions and the messagepack-rpc package, all properly migrated to use import map aliases.
| import { | ||
| assertEquals, | ||
| assertMatch, | ||
| assertNotMatch, | ||
| assertStringIncludes, | ||
| } from "jsr:@std/assert@^1.0.1"; | ||
| } from "@std/assert"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collapse multiline imports to restore formatter compliance
Same Prettier rule applies here – keep imports on one line.
-import {
- assertEquals,
- assertMatch,
- assertNotMatch,
- assertStringIncludes,
-} from "@std/assert";
+import { assertEquals, assertMatch, assertNotMatch, assertStringIncludes } from "@std/assert";
-import {
- assertSpyCallArgs,
- assertSpyCalls,
- resolvesNext,
- returnsNext,
- spy,
- type Stub,
- stub,
-} from "@std/testing/mock";
+import { assertSpyCallArgs, assertSpyCalls, resolvesNext, returnsNext, spy, type Stub, stub } from "@std/testing/mock";Also applies to: 12-19
🤖 Prompt for AI Agents
In denops/@denops-private/cli_test.ts between lines 5 and 10 (and also lines 12
to 19), the multiline import statements violate the Prettier formatting rules.
Collapse these multiline imports into single-line imports to restore formatter
compliance, ensuring all imported items from the same module are listed on one
line.
| import { delay } from "@std/async/delay"; | ||
| import type { Entrypoint } from "@denops/core"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify both @std/async/delay and @denops/core are present in the import map
Two bare specifiers were introduced. Make sure they are registered so the plugin loads during tests.
🏁 Script executed:
#!/bin/bash
IMPORT_MAP=$(jq -r '.importMap' deno.jsonc)
for pkg in '@std/async/delay' '@denops/core'; do
rg -n "\"$pkg\"" "$IMPORT_MAP" || echo "❌ $pkg not found in import map"
doneLength of output: 528
🏁 Script executed:
#!/bin/bash
echo "Searching for importMap entry in deno.jsonc"
rg -n '"importMap"' deno.jsonc || trueLength of output: 136
🏁 Script executed:
#!/bin/bash
for pkg in '@std/async/delay' '@denops/core'; do
echo "Searching for $pkg in deno.jsonc"
rg -n "$pkg" deno.jsonc || echo "❌ $pkg not found in deno.jsonc"
doneLength of output: 496
Add missing @std/async/delay entry to the import map
We verified that one of the new bare-specifier imports is not yet registered:
• @denops/core is already mapped in deno.jsonc (line 26):
"@denops/core": "jsr:@denops/core@^7.0.0",
• @std/async/delay is not found in deno.jsonc
Please add an entry for @std/async/delay under the imports section of your import map in deno.jsonc, for example:
{
// …
"imports": {
"@std/async/delay": "https://deno.land/std@<std-version>/async/delay.ts",
"@denops/core": "jsr:@denops/core@^7.0.0",
// …
}
}This will ensure that import { delay } from "@std/async/delay"; resolves correctly in your tests.
🤖 Prompt for AI Agents
In tests/denops/testdata/dummy_dispatcher_plugin.ts at lines 1-2, the import of
"@std/async/delay" is missing a corresponding entry in the deno.jsonc import
map. To fix this, add an entry for "@std/async/delay" under the "imports"
section in deno.jsonc, mapping it to the correct URL with the appropriate std
version, for example: "@std/async/delay":
"https://deno.land/std@<std-version>/async/delay.ts". This will ensure the
import resolves correctly during tests.
| @@ -1,4 +1,4 @@ | |||
| import type { Entrypoint } from "jsr:@denops/core@^7.0.0"; | |||
| import type { Entrypoint } from "@denops/core"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify that @denops/core is declared in the import map
The old jsr: specifier has been dropped, so this file now depends on an alias called @denops/core.
Please double-check that the project-level import map (deno.jsonc or import_map.json) includes:
{
"imports": {
"@denops/core": "https://deno.land/x/denops_core@<version>/mod.ts"
}
}If the alias is missing the test will fail at load-time.
Run the script below from the repo root to confirm all required aliases are present:
🏁 Script executed:
#!/bin/bash
# List expected aliases and grep them in the import-map files
for a in '@denops/core'; do
grep -R --line-number --color "$a" $(fd -e json -e jsonc -I import_map) || \
echo "⚠️ Alias $a not found"
doneLength of output: 291
Add missing @denops/core alias in import maps
The import map under tests/denops/testdata/with_import_map does not include the @denops/core entry, so any import from that specifier will fail at load-time. Please update both import_map.json and import_map.jsonc in that directory (and, if you rely on a project-level import map, your deno.jsonc or import_map.json at the repo root) to include:
{
"imports": {
+ "@denops/core": "https://deno.land/x/denops_core@<version>/mod.ts",
// …other aliases
}
}• Files to update:
- tests/denops/testdata/with_import_map/import_map.json
- tests/denops/testdata/with_import_map/import_map.jsonc
- (optional) deno.jsonc or import_map.json at project root
Verify the alias is present with:
grep -R "@denops/core" deno.jsonc import_map.json tests/denops/testdata/with_import_map/import_map.*Then rerun your tests to confirm the import loads correctly.
🤖 Prompt for AI Agents
In tests/denops/testdata/dummy_invalid_constraint_plugin2.ts at line 1, the
import of '@denops/core' will fail because the import maps lack an alias for
'@denops/core'. To fix this, add an entry mapping '@denops/core' to the correct
path in the import_map.json and import_map.jsonc files located in
tests/denops/testdata/with_import_map, and also update the project-level import
map file (deno.jsonc or import_map.json) if used. After updating, verify the
alias is present using the provided grep command and rerun tests to ensure the
import resolves correctly.
| import type { Entrypoint } from "@denops/core"; | ||
| import { getMessage, greeting } from "@test/helper"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Check that all new shorthand aliases exist (@denops/core, @test/helper)
Both aliases must be declared in the workspace import map; otherwise plugin loading will crash at runtime.
You can extend the earlier verification script with extra expected identifiers:
🏁 Script executed:
#!/bin/bash
for a in '@denops/core' '@test/helper' '@std/async' '@std/assert'; do
grep -R --line-number --color "$a" $(fd -e json -e jsonc -I import_map) || \
echo "⚠️ Alias $a not found"
doneLength of output: 1432
To confirm which aliases this test actually needs, let’s inspect the entire import block in plugin_with_import_map.ts:
🏁 Script executed:
#!/bin/bash
# Show the first 20 lines of the test file to see all imports
cat tests/denops/testdata/with_import_map/plugin_with_import_map.ts | sed -n '1,20p'Length of output: 478
Ensure the import map includes every alias used by plugin_with_import_map.ts
The test file imports:
@denops/core@test/helper
Currently, in tests/denops/testdata/with_import_map/import_map.json (and .jsonc), only @test/helper is defined. You’ll need to add a mapping for @denops/core so that the plugin can resolve it at runtime. For example:
--- tests/denops/testdata/with_import_map/import_map.json
+++ tests/denops/testdata/with_import_map/import_map.json
@@ "imports": {
- "@test/helper": "./helper.ts"
+ "@denops/core": "https://denops.land/x/denops/core/mod.ts",
+ "@test/helper": "./helper.ts"
}(Adjust the right‐hand path/URL to match your project’s entry point for @denops/core.)
You can verify both aliases with:
for a in '@denops/core' '@test/helper'; do
grep -R --line-number "$a" tests/denops/testdata/with_import_map/import_map.{json,jsonc} \
|| echo "⚠️ Alias $a not found"
done🤖 Prompt for AI Agents
In tests/denops/testdata/with_import_map/plugin_with_import_map.ts at lines 1-2,
the file imports both '@denops/core' and '@test/helper', but the import map in
tests/denops/testdata/with_import_map/import_map.json (and .jsonc) only defines
'@test/helper'. To fix this, add an entry for '@denops/core' in the import map
files, mapping it to the correct path or URL for the '@denops/core' package in
your project. Verify both aliases are present by searching the import map files
as suggested.
9261af6 to
6c12579
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #451 +/- ##
==========================================
+ Coverage 96.52% 96.75% +0.22%
==========================================
Files 27 11 -16
Lines 1468 954 -514
Branches 192 143 -49
==========================================
- Hits 1417 923 -494
+ Misses 47 28 -19
+ Partials 4 3 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (69)
autoload/denops/_internal/server/proc.vim(2 hunks)deno.jsonc(1 hunks)denops/@denops-private/cli.ts(1 hunks)denops/@denops-private/cli_test.ts(2 hunks)denops/@denops-private/deno.jsonc(1 hunks)denops/@denops-private/denops.ts(1 hunks)denops/@denops-private/denops_test.ts(2 hunks)denops/@denops-private/error.ts(1 hunks)denops/@denops-private/error_test.ts(1 hunks)denops/@denops-private/host.ts(1 hunks)denops/@denops-private/host/nvim.ts(1 hunks)denops/@denops-private/host/nvim_test.ts(1 hunks)denops/@denops-private/host/vim.ts(1 hunks)denops/@denops-private/host/vim_test.ts(1 hunks)denops/@denops-private/host_test.ts(1 hunks)denops/@denops-private/plugin.ts(1 hunks)denops/@denops-private/plugin_test.ts(1 hunks)denops/@denops-private/service.ts(1 hunks)denops/@denops-private/service_test.ts(1 hunks)denops/@denops-private/util.ts(1 hunks)denops/@denops-private/version.ts(1 hunks)denops/@denops-private/version_test.ts(1 hunks)denops/@denops-private/worker.ts(1 hunks)denops/@denops-private/worker_test.ts(1 hunks)tests/denops/runtime/functions/denops/interrupt_test.ts(1 hunks)tests/denops/runtime/functions/denops/notify_test.ts(1 hunks)tests/denops/runtime/functions/denops/request_async_test.ts(1 hunks)tests/denops/runtime/functions/denops/request_test.ts(1 hunks)tests/denops/runtime/functions/plugin/check_type_test.ts(1 hunks)tests/denops/runtime/functions/plugin/discover_test.ts(1 hunks)tests/denops/runtime/functions/plugin/is_loaded_test.ts(1 hunks)tests/denops/runtime/functions/plugin/load_test.ts(1 hunks)tests/denops/runtime/functions/plugin/reload_test.ts(1 hunks)tests/denops/runtime/functions/plugin/unload_test.ts(1 hunks)tests/denops/runtime/functions/plugin/wait_async_test.ts(1 hunks)tests/denops/runtime/functions/plugin/wait_test.ts(1 hunks)tests/denops/runtime/functions/server/close_test.ts(1 hunks)tests/denops/runtime/functions/server/connect_test.ts(1 hunks)tests/denops/runtime/functions/server/start_test.ts(1 hunks)tests/denops/runtime/functions/server/status_test.ts(1 hunks)tests/denops/runtime/functions/server/stop_test.ts(1 hunks)tests/denops/runtime/plugin_test.ts(1 hunks)tests/denops/testdata/dummy_dispatcher_plugin.ts(1 hunks)tests/denops/testdata/dummy_interrupt_plugin.ts(1 hunks)tests/denops/testdata/dummy_invalid_constraint_plugin.ts(1 hunks)tests/denops/testdata/dummy_invalid_constraint_plugin2.ts(1 hunks)tests/denops/testdata/dummy_invalid_dispose_plugin.ts(1 hunks)tests/denops/testdata/dummy_invalid_plugin.ts(1 hunks)tests/denops/testdata/dummy_invalid_wait_plugin.ts(1 hunks)tests/denops/testdata/dummy_plugins/denops/@dummy_namespace/main.ts(1 hunks)tests/denops/testdata/dummy_plugins/denops/dummy.invalid_name/main.ts(1 hunks)tests/denops/testdata/dummy_plugins/denops/dummy_invalid/main.ts(1 hunks)tests/denops/testdata/dummy_plugins/denops/dummy_valid/main.ts(1 hunks)tests/denops/testdata/dummy_valid_dispose_plugin.ts(1 hunks)tests/denops/testdata/dummy_valid_plugin.ts(1 hunks)tests/denops/testdata/dummy_valid_wait_plugin.ts(1 hunks)tests/denops/testdata/resolve.ts(1 hunks)tests/denops/testdata/shared_server_test_no_verbose.ts(1 hunks)tests/denops/testdata/shared_server_test_verbose_true.ts(1 hunks)tests/denops/testdata/with_import_map/plugin_with_import_map.ts(1 hunks)tests/denops/testutil/conf.ts(1 hunks)tests/denops/testutil/conf_test.ts(1 hunks)tests/denops/testutil/mock.ts(1 hunks)tests/denops/testutil/mock_test.ts(1 hunks)tests/denops/testutil/shared_server.ts(1 hunks)tests/denops/testutil/shared_server_test.ts(1 hunks)tests/denops/testutil/wait.ts(1 hunks)tests/denops/testutil/wait_test.ts(1 hunks)tests/denops/testutil/with.ts(1 hunks)
✅ Files skipped from review due to trivial changes (37)
- tests/denops/runtime/functions/server/status_test.ts
- denops/@denops-private/host.ts
- tests/denops/runtime/functions/denops/request_async_test.ts
- tests/denops/testutil/conf.ts
- tests/denops/runtime/functions/plugin/discover_test.ts
- tests/denops/testdata/dummy_valid_plugin.ts
- tests/denops/runtime/functions/denops/interrupt_test.ts
- tests/denops/testutil/conf_test.ts
- denops/@denops-private/error.ts
- tests/denops/testdata/dummy_plugins/denops/dummy_invalid/main.ts
- tests/denops/testdata/with_import_map/plugin_with_import_map.ts
- tests/denops/testutil/mock.ts
- tests/denops/testdata/dummy_valid_wait_plugin.ts
- tests/denops/runtime/functions/plugin/check_type_test.ts
- tests/denops/testdata/dummy_invalid_wait_plugin.ts
- tests/denops/testutil/shared_server_test.ts
- tests/denops/runtime/functions/plugin/load_test.ts
- denops/@denops-private/util.ts
- tests/denops/runtime/functions/server/stop_test.ts
- tests/denops/testutil/with.ts
- tests/denops/runtime/functions/plugin/is_loaded_test.ts
- denops/@denops-private/error_test.ts
- tests/denops/testutil/wait.ts
- tests/denops/runtime/functions/denops/notify_test.ts
- tests/denops/runtime/functions/denops/request_test.ts
- tests/denops/runtime/functions/plugin/wait_async_test.ts
- tests/denops/testutil/shared_server.ts
- denops/@denops-private/version_test.ts
- denops/@denops-private/host_test.ts
- tests/denops/runtime/functions/plugin/wait_test.ts
- tests/denops/runtime/plugin_test.ts
- tests/denops/testutil/mock_test.ts
- tests/denops/testutil/wait_test.ts
- tests/denops/testdata/dummy_interrupt_plugin.ts
- tests/denops/runtime/functions/server/close_test.ts
- tests/denops/testdata/dummy_invalid_plugin.ts
- denops/@denops-private/plugin_test.ts
🚧 Files skipped from review as they are similar to previous changes (31)
- tests/denops/testdata/dummy_dispatcher_plugin.ts
- tests/denops/testdata/dummy_valid_dispose_plugin.ts
- tests/denops/testdata/resolve.ts
- tests/denops/testdata/dummy_invalid_constraint_plugin.ts
- tests/denops/testdata/dummy_plugins/denops/dummy.invalid_name/main.ts
- tests/denops/testdata/dummy_plugins/denops/@dummy_namespace/main.ts
- tests/denops/testdata/dummy_invalid_dispose_plugin.ts
- tests/denops/testdata/shared_server_test_verbose_true.ts
- tests/denops/testdata/dummy_invalid_constraint_plugin2.ts
- denops/@denops-private/host/vim.ts
- tests/denops/testdata/shared_server_test_no_verbose.ts
- autoload/denops/_internal/server/proc.vim
- denops/@denops-private/denops.ts
- denops/@denops-private/version.ts
- tests/denops/runtime/functions/server/start_test.ts
- denops/@denops-private/plugin.ts
- denops/@denops-private/cli.ts
- denops/@denops-private/deno.jsonc
- denops/@denops-private/cli_test.ts
- tests/denops/testdata/dummy_plugins/denops/dummy_valid/main.ts
- denops/@denops-private/host/nvim_test.ts
- tests/denops/runtime/functions/plugin/unload_test.ts
- denops/@denops-private/denops_test.ts
- tests/denops/runtime/functions/plugin/reload_test.ts
- denops/@denops-private/host/nvim.ts
- denops/@denops-private/host/vim_test.ts
- denops/@denops-private/service.ts
- tests/denops/runtime/functions/server/connect_test.ts
- denops/@denops-private/service_test.ts
- denops/@denops-private/worker.ts
- denops/@denops-private/worker_test.ts
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Milly
PR: vim-denops/denops.vim#418
File: tests/denops/runtime/functions/plugin/check_type_test.ts:6-6
Timestamp: 2024-09-14T17:09:30.174Z
Learning: In this project, import paths prefixed with `/denops-testdata/` are defined in `deno.jsonc` via an import map, and these import paths are valid.
📚 Learning: in this project, import paths prefixed with `/denops-testdata/` are defined in `deno.jsonc` via an i...
Learnt from: Milly
PR: vim-denops/denops.vim#418
File: tests/denops/runtime/functions/plugin/check_type_test.ts:6-6
Timestamp: 2024-09-14T17:09:30.174Z
Learning: In this project, import paths prefixed with `/denops-testdata/` are defined in `deno.jsonc` via an import map, and these import paths are valid.
Applied to files:
deno.jsonc
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: test (macos-latest, 2.x, v9.1.0448, v0.10.0)
- GitHub Check: test (windows-latest, 2.x, v9.1.0448, v0.10.0)
- GitHub Check: test (ubuntu-latest, 2.x, v9.1.0448, v0.10.0)
- GitHub Check: test (macos-latest, 1.45.0, v9.1.0448, v0.10.0)
🔇 Additional comments (3)
deno.jsonc (3)
2-4: Confirmworkspacekey is recognised by the CI Deno version
workspacelanded in Deno v1.46. Older runners will fail to parse the config with
error: Unrecognized option 'workspace' in config.
Double-check the minimum Deno version declared in CI / docs and bump it if necessary.
9-10:--coverage-raw-data-onlyflag requires Deno ≥ 1.44The flag was introduced recently; using it on earlier toolchains will break the
test:coveragetask. Please verify the runner version or gate the flag with a
version check.
23-33: Alias additions look goodImport-map entries are correctly version-pinned to the latest
^1.xseries and follow the existing naming convention. No issues spotted.
| "update": "deno outdated --update --latest --recursive", | ||
| "update:interactive": "deno task update -- --interactive", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid self-referential task invocation
update:interactive shells out to deno task update, which is fine, but you
can call deno outdated directly and forward the extra flag to simplify the
indirection:
- "update:interactive": "deno task update -- --interactive",
+ "update:interactive": "deno outdated --update --latest --recursive --interactive",Fewer layers → easier to debug.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "update": "deno outdated --update --latest --recursive", | |
| "update:interactive": "deno task update -- --interactive", | |
| "update": "deno outdated --update --latest --recursive", | |
| "update:interactive": "deno outdated --update --latest --recursive --interactive", |
🤖 Prompt for AI Agents
In deno.jsonc around lines 11 to 12, the "update:interactive" task currently
calls "deno task update" which then calls "deno outdated". To simplify and
reduce indirection, modify "update:interactive" to call "deno outdated" directly
with the "--update --latest --recursive --interactive" flags, forwarding the
interactive flag directly. This reduces layers and makes debugging easier.
b97cba5 to
43dce43
Compare
43dce43 to
deb9e1c
Compare
deb9e1c to
af037ea
Compare
Summary
jsr:@molt/clitodeno outdatedfor dependency updatesTest plan
deno outdatedworks for dependency updates🤖 Generated with Claude Code
Summary by CodeRabbit